package com.baizhi.cmfzdemo.appControlle;

import com.baizhi.cmfzdemo.entity.CmfzBanner;
import com.baizhi.cmfzdemo.service.CmfzBannerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * Created by 54433 on 2019/4/12.
 */
@RestController
@RequestMapping("/banner2")
public class AppBannerController {
    @Autowired
    private CmfzBannerService cmfzBannerService;


    /**
     * 轮播图页面显示六张
     */
    @RequestMapping("/showAllBanner")
    public List<CmfzBanner> showAllBanner(){
        //展示轮播图数据
        cmfzBannerService.showAllBanner();
        return cmfzBannerService.showAllBanner();
    }


}
